{extend name="public/base"/}
{block name="body"}
<div class="main-box no-header clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>打印详情</h2>
		</div>
		<div class="pull-right">
			<!-- <a href="{:url('add')}" class="btn btn-primary pull-right"> <i class="fa fa-plus-circle fa-lg"></i> 新增</a> -->
		</div>
	</header>
	<div class="main-box-body clearfix">
		<div class="table-responsive">
			<!--startprint-->
			<div class="col-lg-12">
					<div class="row">
							<div class="col-lg-12">
									<h2 class="text-center">贵阳鲜果屋销售单</h2>
							</div>
					</div>
					<div class="row">
							<div class="col-lg-2" style="width:220px; display: inline-block;">
									<p>企业名称：{$info.user_name}</p>
							</div>
							<div class="col-lg-2" style="width:220px; display: inline-block;">
									<p>企业地址：{$info.nick_name}</p>
							</div>
							<div class="col-lg-2" style="width:220px; display: inline-block;">
									<p>企业联系人名字：{$info.create_time}</p>
							</div>
							<div class="col-lg-2" style="   display: inline-block;">
									<p>企业联系人电话：{$info.address}</p>
							</div>
					</div>


					<div class="row">
							<div class="col-lg-12">
									<table class="table table-bordered">
											<thead>
												<tr>
													<th width="60px">行号</th>
													<th>规格名称</th>
													<th>数 量</th>
													<th>单 价</th>
													<th>金 额</th>
												</tr>
											</thead>
												{volist name="shoplist" id="vo"}
												<tr>
													<td>{$key+1}</td>
													<td>{$vo['good_name']}（{$vo['rule_name']}）</td>
																											<td>{$vo['num']}</td>
													<td>{$vo['price']}</td>

													<td>{$vo['num']*$vo['price']}</td>
												</tr>
												{/volist}

												<tr>
													<td colspan="5" style="font-size:12px;"> 运费：{$info.freight}元    余额：{$info.balance}元   优惠券：{$info.coupon_price}元   打包费用：{$info.pack_price}</td>

											</tr>
												<tr>
													<td colspan="4">合计</td>
													<td>{$info.shop_price}</td>
											</tr>
										</table>
							</div>
					</div>
			</div>

			<!--endprint-->
			<div class="pull-right">
				<a href="javascript:;"  class="btn btn-primary pull-right" onclick="doPrint()">打印订单</a>
			</div>
    </div>
	</div>
</div>
<script type="text/javascript">
function doPrint() {
					$('body').attr('style', 'padding: 0;');
					$('.table td').attr('style', 'font-size: 12px;');
					$('title').text('打印订单详情')
					bdhtml = window.document.body.innerHTML;
					sprnstr = "<!--startprint-->";
					eprnstr = "<!--endprint-->";
					prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
					prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
					window.document.body.innerHTML = prnhtml;
					window.print();
				}
</script>

{/block}
